home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 7
/
Aminet 7 - August 1995.iso
/
Aminet
/
comm
/
mebbs
/
pgsys101.lha
/
rexx
/
PAGE.REXX
next >
Wrap
OS/2 REXX Batch file
|
1994-09-04
|
5KB
|
243 lines
/* Auto Pager Chat v.020 by ya thats right Joe's Back at UnderWorld Productions */
signal on ERROR
parse arg LineNumber
options results
DoorName = "RXLogon"
author = "Lost Cause"
if( ~show( 'l', "mebbsarexx.library" ) )then do
if( ~addlib( "mebbsarexx.library", 0, -30, 0 ) )then do
say "Could not open library"
exit 10
end
end
if ~show('L','rexxsupport.library') then do
if addlib('rexxsupport.library',0,-30,0) then nop
else do
exit 10
end
end
call GetVar DoorName,LineNumber,1
UserName = result
call GetVar DoorName,LineNumber,2
password=result
call GetVar Doorname,LineNumber,3
Address = result
call GetVar Doorname,LineNumber,4
City = result
call GetVar Doorname,LineNumber,5
State = result
call GetVar DoorName,LineNumber,7
telephone=result
call GetVar Doorname,LineNumber,8
Grafx = result
call GetVar Doorname,LineNumber,11
NumCall = result
call GetVar Doorname,LineNumber,20
Accesslvl = result
call GetVar Doorname,LineNumber,21
Handle = result
call open cfg, ('MEBBSNET:CONFIGFILES/LOGON.CFG'), 'R'
BBSNAME=readln(cfg)
SYSOP=readln(cfg)
SYSOPHAND=readln(cfg)
MAINPTH=readln(cfg)
VU1FN=readln(cfg)
HSTORY=readln(cfg)
PREFIX=readln(cfg)
LASTXONT=readln(cfg)
SECURONT=readln(cfg)
AUTOVALUP=readln(cfg)
SPECIALCALL=readln(cfg)
ADTIME=readln(cfg)
IVALIDU=readln(cfg)
IIVALIDU=readln(cfg)
call close cfg
call grfxck
b=0
call open(muzak,MAINPTH'Page.Music', 'R')
do until b=48
b=b+1
mzk.b=upper(readln(muzak))
end
call close(muzak)
c=0
call open(strng,MAINPTH'page.string', 'R')
do until c=26
c=c+1
str.c=readln(strng)
end
call close(strng)
DAY=UPPER(LEFT(DATE(w),3))
TIMEN=upper(left(time(m),5))
a=0
call open(pgectrl,MAINPTH'page.'DAY, 'R')
do until a=48
a=a+1
opt.a=upper(left(readln(pgectrl),1))
end
call close(pgectrl)
NMBR=left(TIMEN/30,2)
NMBR=compress(NMBR,'.')
call window
string=str.1
call output
string=str.2
call output
call blank
call open(setting,MAINPTH'Page.cfg', 'R')
nqmb=readln(setting)
answ=upper(readln(setting))
joke=upper(readln(setting))
call close(setting)
if answ='N' then signal Quack
signal lists
lists:
call open(lsts,MAINPTH'Page.Users','R')
do while EOF(lsts) = 0
name=upper(readln(lsts))
if upper(NAME) = upper(USERNAME) then signal spaging
end
signal squack
spaging:
call close(lsts)
signal paging
squack:
call close(lsts)
signal quack
quack:
if nqmb='1' then signal Paging
if nqmb='2' then signal work
if nqmb='3' then signal autopage
work:
if opt.nmbr='Y' then signal Paging
signal autopage
paging:
address command mzk.nmbr
d1=str.25*50
call delay(d1)
string=normal||str.3
call output
string=normal||str.4
call getkey
address command mzk.nmbr
signal getout
autopage:
d2=str.26*50
call delay(d2)
call blank
if joke='Y' then signal jokepg
signal normpage
normpage:
string=normal||str.5 ;call output
string=Normal||str.4
call getkey
signal getout
jokepg:
string=normal||str.6 ;call output ;call delay(75)
string=MAGENTA||str.7 ;call msg ;call delay(5)
string=str.8 ;call msg ;call delay(18)
string=str.9 ;call msg ;call delay(34)
string=str.10 ;call msg ;call delay(27)
string=str.11 ;call msg ;call delay(41)
string=str.12 ;call msg ;call delay(10)
string=str.13 ;call msg ;call delay(12)
string=str.14 ;call msg ;call delay(33)
string=str.15 ;call msg ;call delay(29)
string=str.16 ;call msg ;call delay(14)
string=str.17 ;call msg ;call delay(11)
string=str.18 ;call msg ;call delay(9)
string=str.19 ;call msg ;call delay(25)
string=str.20 ;call msg ;call delay(30)
string=str.21 ;call msg ;call delay(13)
string=str.22 ;call msg ;call delay(4)
string=str.23 ;call msg ;call delay(18)
string="" ;call output
string=GREEN""
length='78'
call input
string=STS||normal||STS
call output
call delay(50)
string=sts||Magenta||str.24||sts
call output
call delay(100)
string=normal||str.5
call output
call blank
string=Normal||str.4
call getkey
signal getout
BLANK:
string = " "
call output
return
CARRIER:
call CDetect doorname,linenumber
cd=upper(result)
if cd="NO CARRIER!" then signal error
return
ERROR:
call Exit_Door DoorName,LineNumber
exit 10
GETKEY:
call hotkey Doorname,LineNumber,String
hot=result
call carrier
Return
GETOUT:
call Exit_Door DoorName,LineNumber
exit 0
GRFXCK:
IF Grafx = 0 THEN DO
red = '' ;green = '' ;yellow = '' ;Byellow = '' ;blue = '' ;magenta = ''
cyan = '' ;Bcyan = '' ;white = '' ;Bwhite = '' ;italics = '' ;bold = ''
normal = '' ;cls = '0C'x ;yes_no = '(y/N)' ;no_yes = '(Y/n)' ;skip = 'H'
sts="" ;END
ELSE DO
red = '
' ;green = '
' ;yellow = '
' ;Byellow = '
'
blue = '
' ;magenta = '
' ;cyan = '
' ;Bcyan = '
'
white = '
' ;Bwhite = '
' ;italics = '
' ;bold = '
'
normal = '
' ;cls = '0C'x||''
yes_no = white"("blue"y"white"/"red"N"white")"
no_yes = white"("red"Y"white"/"blue"n"white")" ;skip = 'H'
sts='' ;END
return
INPUT:
call Prompt doorname,linenumber,string,length
typed=result
call carrier
return
MSG:
call message DoorName,LineNumber,String,0
Return
OUTPUT:
call message doorname,linenumber,string,1
call carrier
return
WINDOW:
if exists(MAINPTH||page.txt) then do
call readgra Doorname,LineNumber,MAINPTH"page"
end
Return